package com.wanmait.recruitment.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wanmait.recruitment.mapper.StageMapper;
import com.wanmait.recruitment.pojo.Scale;
import com.wanmait.recruitment.pojo.Stage;
import com.wanmait.recruitment.service.StageService;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional(rollbackFor = Exception.class)
public class StageServicelmpl implements StageService {
     @Resource
     private StageMapper stageMapper;
    @Override
    public void insert(Stage object) {
        stageMapper.insert(object);
    }

    @Override
    public void delete(Integer id) {
        stageMapper.delete(id);
    }

    @Override
    public void delete(String ids) {
    }

    @Override
    public void update(Stage object) {

    }

    @Override
    public Stage findById(Integer id) {
        return null;
    }

    @Override
    public List<Stage> findAll() {
        return stageMapper.slelect();
    }

    @Override
    public List<Stage> findAll(Stage object) {
        return null;
    }

    @Override
    public PageInfo<Stage> findPage(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<Stage>stages = stageMapper.slelect();
        PageInfo<Stage>pageInfo = new PageInfo<>(stages);
        return pageInfo;
    }
}
